Quick Start
Use the following instructions to get up and running with the Mobai SDK
The SDK is packaged as a XCFramwework in order to support binaries for both simulator and iOS SDKs
Requirements
- Xcode 11 or later
- iOS 13.0 or later
Installation
The Mobai SDK can be added to a Xcode project with CocoaPods or manually.
The SDK is compiled with the Build Library for Distribution
flag set to YES, which enables support for Swift module stability.
Applications using the Mobai SDK must include the NSCameraUsageDescription key in the app's Info.plist file, and request the user to authorize camera usage.
CocoaPods
Add the following contents to your podfile
use_frameworks!
target :YourTargetName do
pod 'Mobai',
podspec: 'https://downloads.mobai.dev/releases/ios/swift/latest/Mobai.podspec'
end
It might be necessary to add the following to the end of the podfile in order to make the dependent cocoapods to have the correct settings
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['MobaiCore', 'SwiftProtobuf'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
Manual
Download the latest version of the Mobai framework here: Mobai.xcframework.zip
Extract the contents of the zipped file and find the Mobai.xcframework
Add the Mobai.xcframework to the Xcode project under Frameworks, Libraries, and Embedded Content section